<div class="cl">
	<div class="content_holder fl">
		<div id="content">
			<div class=" ">
				<div class="tab_holder">
					<div class=" cl">
						<!-- My Messages -->
						<h1>My Dialogues</h1>
						<ul id="dialog_list">
						<?php foreach ($dataProvider as $key => $message) : ?>
							<li>
								<div class="date"><?php echo Yii::app()->dateFormatter->format("dd/MM/yyyy H:mm", $message['crdate']); ?></div>
								<a class="crnt_dialog <?php echo $message['read'] == 1 ? 'new': '';  ?>" href="<?php echo Yii::app()->createUrl('users/viewMessage',array('companion'=>$message['dialog'] )); ?>">
									<?php if($message['from_id'] == Yii::app()->user->id) {  ?>
										<div class="br5">
											<?php echo $this->material_image(Yii::app()->user->id, Yii::app()->user->getState('avatar'), '40', 'images/' . Yii::app()->user->id, 'material_img br5'); ?>
										</div>
										<?php echo $message['text']; ?>
									<?php } else { ?>
										<p><?php echo $message['text']; ?></p>
									<?php } ?>
								</a>
								<div class="av">
									<a href="<?php echo Yii::app()->createUrl('users/view', array('id'=>$message['user_id']));?>">
										<div class="br5">
											<?php echo $this->material_image($message['user_id'], $message['avatar'], '58', 'images/' . $message['user_id']); ?>
										</div>
										<span><?php echo CHtml::encode($message['full_name']); ?></span>
									</a>
								</div>
								<div class="arr"></div>
							</li>
						<?php endforeach ?>
						</ul>
						<!-- END My Messages -->
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- Right col -->
	<div id="right" class="br5">
		<div class="order_form">
			<!-- right menu Cabinet -->
			<?php $this->renderPartial('_menu_r_Cabinet'); ?>
		</div>
	</div>
</div>